Optimal. Leaf size=19 \[ x \tanh ^{-1}\left (\frac {1}{x}\right )+\frac {1}{2} \log \left (1-x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.750, Rules used = {6021, 269, 266}
\begin {gather*} \frac {1}{2} \log \left (1-x^2\right )+x \tanh ^{-1}\left (\frac {1}{x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 266
Rule 269
Rule 6021
Rubi steps
\begin {align*} \int \tanh ^{-1}\left (\frac {1}{x}\right ) \, dx &=x \tanh ^{-1}\left (\frac {1}{x}\right )+\int \frac {1}{\left (1-\frac {1}{x^2}\right ) x} \, dx\\ &=x \tanh ^{-1}\left (\frac {1}{x}\right )+\int \frac {x}{-1+x^2} \, dx\\ &=x \tanh ^{-1}\left (\frac {1}{x}\right )+\frac {1}{2} \log \left (1-x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 17, normalized size = 0.89 \begin {gather*} x \tanh ^{-1}\left (\frac {1}{x}\right )+\frac {1}{2} \log \left (-1+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.14, size = 30, normalized size = 1.58
method | result | size |
derivativedivides | \(x \arctanh \left (\frac {1}{x}\right )+\frac {\ln \left (\frac {1}{x}+1\right )}{2}+\frac {\ln \left (\frac {1}{x}-1\right )}{2}-\ln \left (\frac {1}{x}\right )\) | \(30\) |
default | \(x \arctanh \left (\frac {1}{x}\right )+\frac {\ln \left (\frac {1}{x}+1\right )}{2}+\frac {\ln \left (\frac {1}{x}-1\right )}{2}-\ln \left (\frac {1}{x}\right )\) | \(30\) |
meijerg | \(-\frac {\ln \left (1-\sqrt {\frac {1}{x^{2}}}\right )-\ln \left (1+\sqrt {\frac {1}{x^{2}}}\right )}{2 \sqrt {\frac {1}{x^{2}}}}+\frac {\ln \left (-\frac {1}{x^{2}}+1\right )}{2}+\ln \left (x \right )-\frac {i \pi }{2}\) | \(46\) |
risch | \(-\frac {x \ln \left (x -1\right )}{2}+\frac {\ln \left (1+x \right ) x}{2}+\frac {i \pi \,\mathrm {csgn}\left (i \left (1+x \right )\right ) \mathrm {csgn}\left (\frac {i \left (1+x \right )}{x}\right )^{2} x}{4}-\frac {i \pi \,\mathrm {csgn}\left (i \left (1+x \right )\right ) \mathrm {csgn}\left (\frac {i \left (1+x \right )}{x}\right ) \mathrm {csgn}\left (\frac {i}{x}\right ) x}{4}-\frac {i \pi \,\mathrm {csgn}\left (i \left (x -1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{2} x}{4}+\frac {i \pi \,\mathrm {csgn}\left (i \left (x -1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right ) \mathrm {csgn}\left (\frac {i}{x}\right ) x}{4}-\frac {i \pi \mathrm {csgn}\left (\frac {i \left (1+x \right )}{x}\right )^{3} x}{4}+\frac {i \pi \mathrm {csgn}\left (\frac {i \left (1+x \right )}{x}\right )^{2} \mathrm {csgn}\left (\frac {i}{x}\right ) x}{4}+\frac {i \pi \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{3} x}{4}-\frac {i \pi \mathrm {csgn}\left (\frac {i \left (x -1\right )}{x}\right )^{2} \mathrm {csgn}\left (\frac {i}{x}\right ) x}{4}+\frac {\ln \left (x^{2}-1\right )}{2}\) | \(212\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.25, size = 15, normalized size = 0.79 \begin {gather*} x \operatorname {artanh}\left (\frac {1}{x}\right ) + \frac {1}{2} \, \log \left (x^{2} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 22, normalized size = 1.16 \begin {gather*} \frac {1}{2} \, x \log \left (\frac {x + 1}{x - 1}\right ) + \frac {1}{2} \, \log \left (x^{2} - 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.08, size = 15, normalized size = 0.79 \begin {gather*} x \operatorname {atanh}{\left (\frac {1}{x} \right )} + \log {\left (x + 1 \right )} - \operatorname {atanh}{\left (\frac {1}{x} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 101 vs.
\(2 (17) = 34\).
time = 0.41, size = 101, normalized size = 5.32 \begin {gather*} \frac {\log \left (-\frac {\frac {\frac {x + 1}{x - 1} - 1}{\frac {x + 1}{x - 1} + 1} + 1}{\frac {\frac {x + 1}{x - 1} - 1}{\frac {x + 1}{x - 1} + 1} - 1}\right )}{\frac {x + 1}{x - 1} - 1} + \log \left (\frac {{\left | x + 1 \right |}}{{\left | x - 1 \right |}}\right ) - \log \left ({\left | \frac {x + 1}{x - 1} - 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.07, size = 15, normalized size = 0.79 \begin {gather*} \frac {\ln \left (x^2-1\right )}{2}+x\,\mathrm {atanh}\left (\frac {1}{x}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________